﻿<?php 
			header("Content-type: text/html; charset=utf-8");

			ini_set('max_execution_time', '0');

			set_time_limit(3000);

			$fileName=$_FILES['file']['name'];

			$rule  = "/.+(?=\.\w+)/";  

 		    preg_match($rule,$fileName,$result);  

 		    $kuoZhanMing=$result[0];

 		    move_uploaded_file($_FILES["file"]["tmp_name"],$fileName);

	    	require 'convertio-php-master/autoload.php'; 

		    use \Convertio\Convertio;

		    $API=new Convertio('c1b2eea3ab43307ccd324ef313887ab4'); 

		    $optins=$_GET['options'];

		    $API->start($fileName, $optins)->wait()->download($kuoZhanMing.'.'.$optins)->delete(); 

		    $arr=['code'=>0,'msg'=>'','data'=>['src'=>$kuoZhanMing.'.'.$optins]];

		    echo  json_encode($arr);



 ?>